<?php

declare (strict_types=1);
namespace App\Model;

use Hyperf\DbConnection\Model\Model;
/**
 * @property int $id 
 * @property int $user_id 
 * @property string $type 
 * @property string $params 
 * @property string $image 
 * @property string $poster_img 
 * @property string $platform 
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class WechatQrcode extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wechat_qrcodes';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'int', 'user_id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];

    const TYPE_USER = 'user';
    const TYPE_SHAREPOSTER = 'poster';

    const TYPE_LABELS =[
        self::TYPE_USER => '用户',
        self::TYPE_SHAREPOSTER => '推广'
    ];

    const PLATFORM_WECHAT = 'wechat';
    const PLATFORM_MINIPROGRAM = 'miniProgram';

    const PLATFORM_WECHAT_LABELS=[
        self::PLATFORM_WECHAT => '微信',
        self::PLATFORM_MINIPROGRAM => '小程序'
    ];
}